<template>
	<div>
		<div class="hhh">
			<p class="pone">潮牌奢侈品管理系统</p>
			<p class="ptwo">欢迎进入潮牌奢侈品管理系统网站</p>
			<p class="pthree">登录时间:{{str}}</p>
			<img :src="`${$ip}/api/public/showimg/${img}`" />
			<p class="pfour">{{name}}</p>
			<el-button class="pfive" @click="goHome()">首页</el-button>
			<el-button style="color: white; line-height: 30px; border: none; background-color: #23262e;"
				@click="exit()">退出
			</el-button>

		</div>
		<div class="app2"></div>
	</div>
</template>

<script>
	export default {
		name: 'endHead',
		data() {
			return {
				name: '',
				str: '',
				img: ''
			}
		},
		methods: {
			exit() {
				window.localStorage.clear();
				this.$router.push('/login')
			},
			goHome() {
				window.localStorage.clear();
				this.$router.push('/home')
			}
		},
		mounted() {
			console.log(window.localStorage.getItem("name"));
			this.name = window.localStorage.getItem("name");
			this.img = window.localStorage.getItem("pic");
			console.log(name);
			let date = new Date();
			let year = date.getFullYear();
			console.log(year);
			let month = date.getMonth() + 1;
			console.log(month);
			let day = date.getDate();
			let hour = date.getHours();
			let min = date.getMinutes();
			let mins = date.getSeconds();
			this.str = year + "年" + month + "月" + day + "号" + hour + "时" + min + "分" + mins + "秒";
		}
	}
</script>

<style>
	.hhh {
		margin-top: 1px;
		width: 100%;
		height: 60px;
		background-color: #23262e;
		display: flex;

	}

	.hhh p {
		line-height: 60px;
	}

	.hhh p.pone {
		color: #189F92;
		margin-left: 3.5%;

	}

	.hhh p.ptwo {
		font-size: 15px;
		color: white;
		margin-left: 8%;

	}

	.hhh p.pthree {
		font-size: 15px;
		margin-left: 1.5%;
		color: white;

	}

	.hhh p.pfour {
		margin-left: 1%;
		font-size: 15px;

		color: #C9C9CA;
	}

	.hhh button.pfive {

		width: 10px;
		font-size: 15px;
		color: #C9C9CA;
		background-color: transparent;
		border: none;
	}

	.hhh img {
		margin-left: 40%;
		margin-top: 20px;
		width: 1.5vw;
		height: 1.5vw;
	}

	.app2 {
		width: 385px;
		height: 5px;
		background-color: #189F92;
		margin-top: -5px;
		margin-left: 15%;
	}
</style>